package selfview.sufutian.com.myapplication;

import android.app.Activity;
import android.os.Bundle;

import android.view.View;
import android.view.Window;
import android.widget.Button;

import androidx.annotation.Nullable;

import selfview.sufutian.com.myapplication.draw2d.ScrollerTestView;

/**
 * Created by sufutian on 2017/7/26.
 */

public class ScrollerAPIActivity extends Activity {

    private ScrollerTestView scrollTest;
    private Button button;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getWindow().requestFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_scroller);

        scrollTest = (ScrollerTestView) findViewById(R.id.scroll);
        button = (Button) findViewById(R.id.button);

        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                scrollTest.setPosition(2);
            }
        });
    }
}
